main_loop_wait(1); /* For the select() on events */
/* Save the device state */
- sprintf(qemu_file, "/tmp/xen.qemu-dm.%d", domid);
+ sprintf(qemu_file, "/var/lib/xen/qemu-save.%d", domid);
do_savevm(qemu_file);
return 0;
# put qemu device model state
if hvm:
write_exact(fd, QEMU_SIGNATURE, "could not write qemu signature")
- qemu_fd = os.open("/tmp/xen.qemu-dm.%d" % dominfo.getDomid(), os.O_RDONLY)
+ qemu_fd = os.open("/var/lib/xen/qemu-save.%d" % dominfo.getDomid(),
+ os.O_RDONLY)
while True:
buf = os.read(qemu_fd, dm_batch)
if len(buf):
else:
break
os.close(qemu_fd)
- os.remove("/tmp/xen.qemu-dm.%d" % dominfo.getDomid())
+ os.remove("/var/lib/xen/qemu-save.%d" % dominfo.getDomid())
if checkpoint:
dominfo.resumeDomain()
if qemu_signature != QEMU_SIGNATURE:
raise XendError("not a valid device model state: found '%s'" %
qemu_signature)
- qemu_fd = os.open("/tmp/xen.qemu-dm.%d" % dominfo.getDomid(),
+ qemu_fd = os.open("/var/lib/xen/qemu-save.%d" % dominfo.getDomid(),
os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
while True:
buf = os.read(fd, dm_batch)
(self.getRequiredInitialReservation() / 1024) ])
args = args + self.dmargs
if restore:
- args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" %
+ args = args + ([ "-loadvm", "/var/lib/xen/xen.qemu-dm.%d" %
self.vm.getDomid() ])
env = dict(os.environ)
if self.display: